//
//  ZZStreamTextResponseSerializer.m
//  ZZNetWorker
//
//  Created by ZengLiZhi on 2024/7/12.
//

#import "ZZStreamTextResponseSerializer.h"

@implementation ZZStreamTextResponseSerializer

- (instancetype)init {
    self = [super init];
    if (!self) {
        return nil;
    }

    self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)];
//    self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"text/event-stream", nil];

    return self;
}

#pragma mark -

- (BOOL)validateResponse:(NSHTTPURLResponse *)response
                    data:(NSData *)data
                   error:(NSError * __autoreleasing *)error
{
    

    return YES;
}

- (id)responseObjectForResponse:(NSURLResponse *)response
                           data:(NSData *)data
                          error:(NSError *__autoreleasing *)error
{
    
    return data;
}
@end
